package com.example.demo.serviceimp;

import com.example.demo.mapper.SectionMapper;
import com.example.demo.service.SectionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SectionServiceImp implements SectionService {

    @Resource
    private SectionMapper sectionMapper;

    /**
     * 增加小节
     * */
    @Override
    public int inssec(String section_name, Integer chapter_id) {
        return sectionMapper.inssec(section_name,chapter_id);
    }
    /**
     * 查看小节
     * */
    @Override
    public List selsec(Integer chapter_id) {
        return sectionMapper.selsec(chapter_id);
    }
    /**
     * 更改小节
     * */
    @Override
    public int updatesection(String section_name, Integer section_id) {
        return sectionMapper.updatesection(section_name,section_id);
    }
    /**
     * 更改小节状态
     * */
    @Override
    public int upsectype(Integer section_type, Integer section_id) {
        return sectionMapper.upsectype(section_type,section_id);
    }
    /**
     * 删除小节
     * */
    @Override
    public int delsec(Integer section_id) {
        return sectionMapper.delsec(section_id);
    }








}
